from numpy import linspace

name = 'egfngf'

ts = linspace(0, 120, 121, dtype=float)

k = [
    2.18503E-5,
    0.0121008,
    1.38209E-7,
    0.00723811,
    694.731,
    6086070.0,
    389.428,
    2112.66,
    1611.97,
    896896.0,
    32.344,
    35954.3,
    1509.36,
    1432410.0,
    0.884096,
    62464.6,
    185.759,
    4768350.0,
    125.089,
    157948.0,
    2.83243,
    518753.0,
    9.85367,
    1007340.0,
    8.8912,
    3496490.0,
    0.0213697,
    763523.0,
    10.6737,
    184912.0,
    0.0771067,
    272056.0,
    0.0566279,
    653951.0,
    15.1212,
    119355.0,
    146.912,
    12876.2,
    1.40145,
    10965.6,
    27.265,
    295990.0,
    2.20995,
    1025460.0,
    0.126329,
    1061.71,
    441.287,
    1.08795E7
]


y0 = [
    1000,
    4560,
    80000.0,
    0.0,
    10000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    600000.0,
    0.0,
    600000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    0.0,
    120000.0,
    120000.0,
    120000.0,
    120000.0
]


def f(t, y, k):
    return [
        ((-1.0 * k[0] * y[0] * y[2])) + (1.0 * k[1] * y[3]),
        ((-1.0 * k[2] * y[1] * y[4])) + (1.0 * k[3] * y[5]),
        ((-1.0 * k[0] * y[0] * y[2])) + (1.0 * k[1] * y[3]),
        ((1.0 * k[0] * y[0] * y[2]) + (-1.0 * k[1] * y[3])),
        ((-1.0 * k[2] * y[1] * y[4]) + (1.0 * k[3] * y[5])),
        ((1.0 * k[2] * y[1] * y[4]) + (-1.0 * k[3] * y[5])),
        ((-1.0 * k[4] * y[3] * y[6] / (y[6] + k[5])) + (-1.0 * k[6] * y[5] * y[6] / (y[6] + k[7])) + (
            1.0 * k[8] * y[9] * y[7] / (y[7] + k[9]))),
        ((1.0 * k[4] * y[3] * y[6] / (y[6] + k[5])) + (1.0 * k[6] * y[5] * y[6] / (y[6] + k[7])) + (
            -1.0 * k[8] * y[9] * y[7] / (y[7] + k[9]))),
        ((-1.0 * k[26] * y[19] * y[8] / (y[8] + k[27]))),
        ((1.0 * k[26] * y[19] * y[8] / (y[8] + k[27]))),
        ((-1.0 * k[10] * y[7] * y[10] / (y[10] + k[11])) + (1.0 * k[12] * y[28] * y[11] / (y[11] + k[13]))),
        ((1.0 * k[10] * y[7] * y[10] / (y[10] + k[11])) + (-1.0 * k[12] * y[28] * y[11] / (y[11] + k[13]))),
        ((-1.0 * k[14] * y[11] * y[12] / (y[12] + k[15])) + (1.0 * k[44] * y[31] * y[13] / (y[13] + k[45])) + (
            1.0 * k[34] * y[23] * y[13] / (y[13] + k[35]))),
        ((1.0 * k[14] * y[11] * y[12] / (y[12] + k[15])) + (-1.0 * k[44] * y[31] * y[13] / (y[13] + k[45])) + (
            -1.0 * k[34] * y[23] * y[13] / (y[13] + k[35]))),
        ((-1.0 * k[42] * y[27] * y[14] / (y[14] + k[43])) + (1.0 * k[46] * y[31] * y[15] / (y[15] + k[47]))),
        ((1.0 * k[42] * y[27] * y[14] / (y[14] + k[43])) + (-1.0 * k[46] * y[31] * y[15] / (y[15] + k[47]))),
        ((-1.0 * k[16] * y[13] * y[16] / (y[16] + k[17])) + (-1.0 * k[18] * y[15] * y[16] / (y[16] + k[19])) + (
            1.0 * k[20] * y[30] * y[17] / (y[17] + k[21]))),
        ((1.0 * k[16] * y[13] * y[16] / (y[16] + k[17])) + (1.0 * k[18] * y[15] * y[16] / (y[16] + k[19])) + (
            -1.0 * k[20] * y[30] * y[17] / (y[17] + k[21]))),
        ((-1.0 * k[22] * y[17] * y[18] / (y[18] + k[23])) + (1.0 * k[24] * y[30] * y[19] / (y[19] + k[25]))),
        ((1.0 * k[22] * y[17] * y[18] / (y[18] + k[23])) + (-1.0 * k[24] * y[30] * y[19] / (y[19] + k[25]))),
        ((-1.0 * k[28] * y[3] * y[20] / (y[20] + k[29])) + (-1.0 * k[30] * y[11] * y[20] / (y[20] + k[31]))),
        ((1.0 * k[28] * y[3] * y[20] / (y[20] + k[29])) + (1.0 * k[30] * y[11] * y[20] / (y[20] + k[31]))),
        ((-1.0 * k[32] * y[21] * y[22] / (y[22] + k[33]))),
        ((1.0 * k[32] * y[21] * y[22] / (y[22] + k[33]))),
        ((-1.0 * k[36] * y[5] * y[24] / (y[24] + k[37]))),
        ((1.0 * k[36] * y[5] * y[24] / (y[24] + k[37]))),
        ((-1.0 * k[38] * y[25] * y[26] / (y[26] + k[39])) + (1.0 * k[40] * y[29] * y[27] / (y[27] + k[41]))),
        ((1.0 * k[38] * y[25] * y[26] / (y[26] + k[39])) + (-1.0 * k[40] * y[29] * y[27] / (y[27] + k[41]))),
        0,
        0,
        0,
        0
    ]


def f_odes(t, y, yout, k):
    yout[:] = [
        ((-1.0 * k[0] * y[0] * y[2])) + (1.0 * k[1] * y[3]),
        ((-1.0 * k[2] * y[1] * y[4])) + (1.0 * k[3] * y[5]),
        ((-1.0 * k[0] * y[0] * y[2])) + (1.0 * k[1] * y[3]),
        ((1.0 * k[0] * y[0] * y[2]) + (-1.0 * k[1] * y[3])),
        ((-1.0 * k[2] * y[1] * y[4]) + (1.0 * k[3] * y[5])),
        ((1.0 * k[2] * y[1] * y[4]) + (-1.0 * k[3] * y[5])),
        ((-1.0 * k[4] * y[3] * y[6] / (y[6] + k[5])) + (-1.0 * k[6] * y[5] * y[6] / (y[6] + k[7])) + (
            1.0 * k[8] * y[9] * y[7] / (y[7] + k[9]))),
        ((1.0 * k[4] * y[3] * y[6] / (y[6] + k[5])) + (1.0 * k[6] * y[5] * y[6] / (y[6] + k[7])) + (
            -1.0 * k[8] * y[9] * y[7] / (y[7] + k[9]))),
        ((-1.0 * k[26] * y[19] * y[8] / (y[8] + k[27]))),
        ((1.0 * k[26] * y[19] * y[8] / (y[8] + k[27]))),
        ((-1.0 * k[10] * y[7] * y[10] / (y[10] + k[11])) + (1.0 * k[12] * y[28] * y[11] / (y[11] + k[13]))),
        ((1.0 * k[10] * y[7] * y[10] / (y[10] + k[11])) + (-1.0 * k[12] * y[28] * y[11] / (y[11] + k[13]))),
        ((-1.0 * k[14] * y[11] * y[12] / (y[12] + k[15])) + (1.0 * k[44] * y[31] * y[13] / (y[13] + k[45])) + (
            1.0 * k[34] * y[23] * y[13] / (y[13] + k[35]))),
        ((1.0 * k[14] * y[11] * y[12] / (y[12] + k[15])) + (-1.0 * k[44] * y[31] * y[13] / (y[13] + k[45])) + (
            -1.0 * k[34] * y[23] * y[13] / (y[13] + k[35]))),
        ((-1.0 * k[42] * y[27] * y[14] / (y[14] + k[43])) + (1.0 * k[46] * y[31] * y[15] / (y[15] + k[47]))),
        ((1.0 * k[42] * y[27] * y[14] / (y[14] + k[43])) + (-1.0 * k[46] * y[31] * y[15] / (y[15] + k[47]))),
        ((-1.0 * k[16] * y[13] * y[16] / (y[16] + k[17])) + (-1.0 * k[18] * y[15] * y[16] / (y[16] + k[19])) + (
            1.0 * k[20] * y[30] * y[17] / (y[17] + k[21]))),
        ((1.0 * k[16] * y[13] * y[16] / (y[16] + k[17])) + (1.0 * k[18] * y[15] * y[16] / (y[16] + k[19])) + (
            -1.0 * k[20] * y[30] * y[17] / (y[17] + k[21]))),
        ((-1.0 * k[22] * y[17] * y[18] / (y[18] + k[23])) + (1.0 * k[24] * y[30] * y[19] / (y[19] + k[25]))),
        ((1.0 * k[22] * y[17] * y[18] / (y[18] + k[23])) + (-1.0 * k[24] * y[30] * y[19] / (y[19] + k[25]))),
        ((-1.0 * k[28] * y[3] * y[20] / (y[20] + k[29])) + (-1.0 * k[30] * y[11] * y[20] / (y[20] + k[31]))),
        ((1.0 * k[28] * y[3] * y[20] / (y[20] + k[29])) + (1.0 * k[30] * y[11] * y[20] / (y[20] + k[31]))),
        ((-1.0 * k[32] * y[21] * y[22] / (y[22] + k[33]))),
        ((1.0 * k[32] * y[21] * y[22] / (y[22] + k[33]))),
        ((-1.0 * k[36] * y[5] * y[24] / (y[24] + k[37]))),
        ((1.0 * k[36] * y[5] * y[24] / (y[24] + k[37]))),
        ((-1.0 * k[38] * y[25] * y[26] / (y[26] + k[39])) + (1.0 * k[40] * y[29] * y[27] / (y[27] + k[41]))),
        ((1.0 * k[38] * y[25] * y[26] / (y[26] + k[39])) + (-1.0 * k[40] * y[29] * y[27] / (y[27] + k[41]))),
        0,
        0,
        0,
        0
    ]
    return 0